<!DOCTYPE html>
<html>
  <body>
  <div>
    <button onclick="navigateFrames();">Navigate</button>
  </div>
  <fencedframe id="frame1"></fencedframe>

  <script>
    function navigateFrames() {
      const url = new URL("title1.html", location.href);
      document.getElementById('frame1').config = new FencedFrameConfig(url);
    }
  </script>

</body>

</html>
